package cn.sumpu.app.guoguojie.biz;

import java.util.Date;
import java.util.List;
import java.util.Map;

import cn.sumpu.app.guoguojie.domain.DoingPictorial;
import cn.sumpu.app.guoguojie.domain.DoingPictorialTopic;
import cn.sumpu.app.guoguojie.domain.PictorialDoing;
import cn.sumpu.app.guoguojie.domain.PictorialTopic;
import cn.sumpu.app.guoguojie.exception.AppBusinessException;
import cn.sumpu.app.guoguojie.util.PageModel;

public interface PictorialTopicBiz {

    //添加画报主题
    void addPictorialTopic(PictorialTopic pictorialTopic) throws AppBusinessException;

    //查询所有画报主题
    List<PictorialTopic> getPictorialTopicAll() throws AppBusinessException;

    //查询所有画报主题
    List<PictorialTopic> getTopicNoLock() throws AppBusinessException;

    //根据画报主题ID查询主题
    PictorialTopic getPictorialTopicId(String topicId) throws AppBusinessException;

    //根据画报ID查询画报主题
    List<PictorialTopic> getPictorialTopicByID(String pictorialId) throws AppBusinessException;

    //根据名称查询画报主题的个数
    int getPictorialTopicByName(String name) throws AppBusinessException;

    //更新画报主题
    void updatePictorialTopicById(PictorialTopic pictorialTopic) throws AppBusinessException;

    //删除画报主题
    void deletePictorialTopicById(String identifier) throws AppBusinessException;

    //给画报添加主题
    void addDoingPictorialTopic(String pictorial, String topicId, Date gmtCreated, Date gmtModified) throws AppBusinessException;

    //删除画报主题
    void deleteDoingPictorialTopic(String pictorial) throws AppBusinessException;

    /**
     * 主题加入者
     * @param topicId
     * @return
     * @throws AppBusinessException
     */
    public List<DoingPictorial> getLastTopicMember(String topicId) throws AppBusinessException;

    public PageModel getLastTopic(int page) throws AppBusinessException;

    //	更新画报的主题
    public void updatePictorialTopic(DoingPictorial dp) throws AppBusinessException;

    //	更新画报在主题中的排序
    public void updatePictorialSort(String pictorial, String pictorialTopic, Integer sort) throws AppBusinessException;

    //	删除主题中的某个画报
    public void delPicFromTopic(String pictorial, String pictorialTopic) throws AppBusinessException;

    //根据红利ID查询主题
    PictorialTopic getPictorialTopicBonus(String bonus) throws AppBusinessException;

    /**
     * author BruceZhang
     * @return	查询所有画报主题
     * @throws AppBusinessException
     */
    PageModel pictorialGrid(Integer pagesize, Integer page) throws AppBusinessException;

    public void saveTopicPictorial(String topicId, DoingPictorial dp) throws AppBusinessException;
    
    public void deletePictorialDoing(String pictorialId, String doingId) throws AppBusinessException;

    public void savePictorialDoing(PictorialDoing pictorialDoing) throws AppBusinessException;

    public void moveTopicSort(String topicId, String moveType) throws AppBusinessException;

    public void movePictorialSort(String topicId, String pictorialId, String moveType) throws AppBusinessException;

    public void moveDoingSort(String pictorialId, String doingId, String moveType) throws AppBusinessException;

    public void setPictorialCover(String pictorialId, String cover) throws AppBusinessException;

    public Integer getTopicMinSort() throws AppBusinessException;

    public Integer getTopicPictorialMinSort(String topicId) throws AppBusinessException;

    public Integer getPictorialDoingMinSort(String pictorialId) throws AppBusinessException;

    public PictorialTopic getTopicById(String topicId) throws AppBusinessException;

    public DoingPictorial getPictorialById(String pictorialId) throws AppBusinessException;

    public DoingPictorialTopic getTopicPictorialById(String topicId, String pictorialId) throws AppBusinessException;

    public PictorialDoing getPictorialDoingById(String pictorialId, String doingId) throws AppBusinessException;

    public PageModel getTopicPictorial(String topicId, Integer page, Integer pageSize) throws AppBusinessException;

    public PageModel getPictorialDoing(String pictorialId, Integer page, Integer pageSize) throws AppBusinessException;
    
    public PageModel getPictorial(Integer page, Integer pageSize,String title) throws AppBusinessException;
	
	 public List<DoingPictorialTopic> getMobileDoingPic()throws AppBusinessException;
    
    public PictorialDoing getPicDoingMobMov(String mobileMove,String currentDoingId,String pictorialId)throws AppBusinessException;

    /**
     * vimple,话题得到画报
     * @param topicId
     * @return
     * @throws AppBusinessException
     */
    public List<DoingPictorialTopic> getPictorialListByTid(String topicId) throws AppBusinessException;
    public void saveTopicPictorialForDoingPic(String topicId, DoingPictorial dp) throws AppBusinessException;
    
    public PageModel getTopicPictorialForAmoy(String topicId, Integer page, Integer pageSize) throws AppBusinessException;
    
    public  List<PictorialDoing> getPictorialDoingForAmoy(String plId) throws AppBusinessException;
    public  List<DoingPictorial> getTopicPictorialForname(String TId) throws AppBusinessException;
    public  List<DoingPictorial> getOneForcreator(Map<String, Object> map) throws AppBusinessException;
}
